package pl.edu.agh.neuraleconomy.persistence.simulation;

import java.util.List;

import pl.edu.agh.neuraleconomy.common.exception.ApplicationRuntimeException;
import pl.edu.agh.neuraleconomy.model.simulation.Share;
import pl.edu.agh.neuraleconomy.persistence.base.BaseDao;

public class ShareDao extends BaseDao<Share>{

	public ShareDao() {
		super(Share.class);
	}
	
	public List<Share> getForSimulation(Long simulationId){
		try{
			return dao.queryBuilder().where().eq(Share.SIMULATION_ID, simulationId).query();
		}catch(Exception e){
			logger.error("", e);
			throw new ApplicationRuntimeException(e);
		}
	}

}
